package nowCoder;

import java.util.Scanner;

public class HJ46 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String x = in.next();
        int y = in.nextInt();
        System.out.println(x.substring(0,y));
    }
}
